package com.qf.fmall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.fmall.product.entity.ProductParams;
import com.qf.fmall.product.mapper.ProductParamsMapper;
import com.qf.fmall.product.service.IProductParamsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weijy
 * @since 2024-01-16
 */
@Service
public class ProductParamsServiceImpl extends ServiceImpl<ProductParamsMapper, ProductParams> implements IProductParamsService {


    @Autowired
    private ProductParamsMapper productParamsMapper;


    @Override
    public Object getParamById(Integer productId) {

        return productParamsMapper.selectOne(new QueryWrapper<ProductParams>()
                .eq("product_id", productId));
    }
}
